package com.safe.first.common.constants;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Mickey
 * @since 2019.11.24
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EnumDict {
    private String name;
    private Integer code;

    public static EnumDict converterFrom(BaseEnum<?> baseEnum) {
        return new EnumDict(baseEnum.getName(), baseEnum.getCode());
    }
}
